package com.qijian.maindata.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.annotation.KingDeeField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
public class TargetLocationSourceData {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "唯一id")
    @KingDeeField("FID")
    private Long id;

    /**
     * 分类
     */
    @Excel(name = "分类")
    @ApiModelProperty(value = "分类")
    @NotBlank(message = "分类不允许为空")
    private String classifyType;

    @Excel(name = "祖级列表")
    @ApiModelProperty(value = "祖级列表")
    private String ancestors;

    /**
     * 编码
     */
    @Excel(name = "编码")
    @ApiModelProperty(value = "编码")
    @KingDeeField("FNumber")
    private String code;

    /**
     * 名称
     */
    @Excel(name = "名称")
    @ApiModelProperty(value = "名称")
    @KingDeeField("FName")
    private String name;

    /**
     * 顶级分类id
     */
    @Excel(name = "顶级分类id")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "顶级分类id")
    private Long topClassifyId;

    /**
     * 父级分类id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentClassifyId;

    private Boolean checked;

    private List<TargetLocationSourceData> children;
 }
